{
int i, j, xc_handle;
xc_perfc_desc_t *pcd;
- unsigned int num, sum, reset = 0;
+ unsigned int num, sum, reset = 0, full = 0;
if ( argc > 1 )
{
char *p = argv[1];
- if ( (*p++ == '-') && (*p == 'r') )
- reset = 1;
+ if ( p[0] == '-' )
+ {
+ switch ( p[1] )
+ {
+ case 'f':
+ full = 1;
+ break;
+ case 'r':
+ reset = 1;
+ break;
+ default:
+ goto error;
+ }
+ }
else
{
+ error:
printf("%s: [-r]\n", argv[0]);
- printf("no args: print xen performance counters\n");
- printf(" -r : reset xen performance counters\n");
+ printf("no args: print digested counters\n");
+ printf(" -f : print full arrays/histograms\n");
+ printf(" -r : reset counters\n");
return 0;
}
}
sum += pcd[i].vals[j];
printf ("T=%10u ", (unsigned int)sum);
- for ( j = 0; j < pcd[i].nr_vals; j++ )
- printf(" %10u", (unsigned int)pcd[i].vals[j]);
+ if ( full || (pcd[i].nr_vals <= 4) )
+ for ( j = 0; j < pcd[i].nr_vals; j++ )
+ printf(" %10u", (unsigned int)pcd[i].vals[j]);
printf("\n");
}
for ( j = sum = 0; j < perfc_info[i].nr_elements; j++ )
sum += atomic_read(&counters[j]);
printk("TOTAL[%10d] ", sum);
- for ( j = 0; j < perfc_info[i].nr_elements; j++ )
- {
- if ( (j != 0) && ((j % 4) == 0) )
- printk("\n ");
- printk("ARR%02d[%10d] ", j, atomic_read(&counters[j]));
- }
counters += j;
break;
}